Method and System for making Recommendation from Binary Data Using Neighbor-Score Matrix and Latent Factors

ABSTRACT

One embodiment is a method executed by a computer system that applies collaborative filtering to provide a recommendation to a user. The method includes retrieving a binary matrix that includes rows and columns of binary data for preferences of users on items; applying a neighborhood-based approach to convert the binary matrix into a neighbor-score matrix; applying a factorization to approximate the neighbor-score matrix with a product of lower rank matrices; calculating a user factor and an item factor based on the factorization; calculating scores for user-item pairs by computing a dot product between the user factor and the item factor; sorting the scores of the user-item pairs to generate the recommendation to the user; and providing the recommendation to a general-purpose computer of the user.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No. 14/975,872, filed Dec. 21, 2015, which claims benefit under 35 U.S.C. § 119(e) of U.S. Provisional Application having Ser. No. 62/108,067 filed Jan. 27, 2015, all of which are hereby incorporated by reference herein in their entirety.

FIELD OF THE INVENTION

The present invention relates to recommender systems, and more particularly, to the use of collaborative filtering in recommender systems.

BACKGROUND

Collaborative filtering is an approach utilized in recommender system to make predictions about preferences of an individual based on preference information of other individuals. This recommender system can function across various web services to deliver personalized recommendations to users, such as Internet users of NETFLIX, AMAZON, YAHOO, GOOGLE, and others.

In collaborative filtering applications, latent factor approaches can be used to generate real-time recommendations for user preferences. Implicit feedback, where preferences are inferred indirectly by observing user behavior, can be collected at a lower cost and in much larger quantities than explicit feedback. Much of the available implicit data is binary where a user either conducts the action or no data is available. Latent factor approaches, however, perform poorly on binary data. Hence, a need exists for methods and systems that utilize collaborative filtering from binary data to determine user preferences and provide recommendations.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a computer system in accordance with an example embodiment.

FIG. 2 shows a method executed by a computer system to provide a recommendation to a user in accordance with an example embodiment.

FIG. 3 shows an example algorithm with block update and sparse similarity in accordance with an example embodiment.

FIG. 4 shows fraction overlap between training data for 110K target users and most popular songs sorted in the order of popularity in accordance with an example embodiment.

FIG. 5 shows MAP@500 private leader board results in accordance with an example embodiment.

FIG. 6 shows runtimes in hours for a SVD model in accordance with an example embodiment.

SUMMARY OF THE INVENTION

One example embodiment is a method executed by a computer system that applies collaborative filtering to provide a recommendation to a user. The method includes retrieving, by servers in the computer system and from a database, a binary matrix that includes rows and columns of binary data for preferences of users on items; applying, by the servers in the computer system, a neighborhood-based approach to convert the binary matrix into a neighbor-score matrix; applying, by the servers in the computer system, a factorization to approximate the neighbor-score matrix with a product of lower rank matrices; calculating, by the servers in the computer system, a user factor and an item factor based on the factorization; calculating, by the servers in the computer system, scores for user-item pairs by computing a dot product between the user factor and the item factor; sorting, by the servers in the computer system, the scores of the user-item pairs to generate the recommendation to the user; and providing, by the servers in the computer system, the recommendation to a general-purpose computer of the user.

Other example embodiments are discussed herein.

DETAILED DESCRIPTION

Examples embodiments relate to apparatus and methods that utilize collaborative filtering (CF) to determine user preferences for a user.

Consider an e-commerce example in which a recommender system executes collaborative filtering to make predictions about preferences of an individual based on preference information of other individuals. This recommender system can function across various services to deliver personalized recommendations to users, such as internet users of NETFLIX, AMAZON, YAHOO, GOOGLE, and others.

In general, CF approaches can be divided into two categories: latent factor approaches and neighbor-based approaches. Latent approaches (discussed in more detail herein) use the observed preferences to create a compact model of the data which is then used to predict the unobserved preferences. In contrast, neighbor-based approaches (discussed in more detail herein) estimate the item preferences for a target user using the similarities from neighboring users and/or items

Preference data that is used to learn CF models can be partitioned into two types: explicit feedback and implicit feedback. Explicit feedback includes explicit preference actions from users. By way of example, data of this type comes in the form of ratings or a thumbs-up/down selection. While explicit feedback generally provides a high quality signal that accurately describes preferences of users. Collecting large amounts of this data can be time consuming.

Implicit feedback can come in many forms that include, but are not limited to, plays, purchases, browse histories, even mouse clicks, and mouse scrolls. Since no additional action is required from users beyond the normal use of the service, large amounts of implicit feedback can often be inexpensively collected in a short amount of time. This data, however, comes at the expense of increased signal noise.

Much of the available implicit data is binary where a user either conducts the action (purchase, browse, click etc.) on a given item or no data is available. Binary feedback makes the recommendation problem particularly challenging since it is difficult to gauge the degree of preference from such data.

In many collaborative filtering applications, latent approaches are the preferred model choice since they can efficiently provide real-time recommendations to users. Latent approaches, however, often perform poorly on implicit feedback in the form of binary data. Hence, a need exists for methods and systems that utilize latent CF from binary data.

One example embodiment includes methods and systems that utilize collaborative filtering with binary data to generate preferences for users. Neighborhood similarity information is used to guide the factorization and derive accurate latent representations. User preferences, in the form of binary data, are mapped to a non-binary space by applying similarity-based transformation to generate non-binary data. A factorization method, such as singular value decomposition (SVD), is applied to the non-binary data to generate accurate user and item latent factors.

The SVD approach learns the latent factors with block-SVD updates that are applied to top-N largest scores for each user. Example embodiments, however, are not limited to using an SVD approach since other factorization approaches as well can be applied once the binary data is mapped to non-binary space.

FIG. 1 shows a computer system 100 in accordance with an example embodiment. The computer system 100 includes a first server 120, a second server 130, a first database 140, a second database 150, a handheld portable electronic device (HPED), and a computer 170. One or more elements in the computer system 100 can communicate with each other through one or more networks 110.

The networks 110 can include one or more of the internet, an intranet, an extranet, a cellular network, a local area network (LAN), a home area network (HAN), metropolitan area network (MAN), a wide area network (WAN), a Bluetooth network, public and private networks, etc.

The first server 120 includes a processor 122 that communicates with a memory 124 and a data collector 126. By way of example, the processor 122 can be a microprocessor, central processing unit (CPU), or application-specific integrated circuit (ASIC) for controlling and/or receiving instructions or data from the memory 124 (such as random access memory (RAM), read only memory (ROM), and/or firmware).

The data collector 126 collects data such as user preferences from the network and stores the collected data in the first database 140. The second server 130 includes a processor 132 that communicates with a memory 134 and a recommender 136. The recommender 136 provides recommendations to users based on collaborative filtering techniques and saves data to the second database 150.

The HPED 160 includes a processor 162 that communicates with a memory 164, a display 166, a user interface 168 and an input/output (I/O) 169. In an example embodiment, the display 166 provides a user interface 168 that can record data related to user preferences such as plays, purchases, browse histories, even mouse clicks, and mouse scrolls and send the recorded data to the network through the input/output (I/O) 169.

The computer 170 includes a processor 172 that communicates with a memory 174, a display 176, a user interface 178 and an input/output (I/O) 179. In an example embodiment, the display 176 provides a user interface 178 that can record data related to user preferences and send the recorded data to the network through the input/output (I/O) 179.

FIG. 2 is a method 200 executed by a computer system to provide a recommendation to a user.

According to block 210, the computer system retrieves a binary matrix (R) that includes rows and columns of binary data for preferences of users on items. By way of example, consider a collaborative filtering problem that has a set of N users U={u₁, . . . , u_(N)} and a set of M items V={v₁, . . . , v_(M)}. The users' binary feedback for the items can be represented by an N×M matrix R where R(u_(n),v_(M))=1 if user u_(n) expressed preference (played, purchased, clicked etc.) for item v_(m) and R(u_(n),v_(m))=0 otherwise. We use U(v_(m)) to denote the set of all users that preferred v_(m) and V(u_(n)) to denote the set of items that u_(n) has expressed preference for. We use a vector notation: R(u_(n),:) denotes the n'th row of R (1× M vector), and R(:,v_(m)) denotes the m'th column (N×1 vector). Unlike another CF where the goal is to accurately predict ratings for every user-item pair, an aim of an example embodiment is to produce in the binary domain a top-τ ranking of the items that the user is most likely to prefer next.

Latent approaches use the observed preferences to create a compact model of the data that is then used to predict the unobserved preferences. For example, latent models derive compact latent factors for both users and items and then use these factors to predict preference. Once the factors are estimated, recommendations can be generated by computing simple dot products between latent factors which allows these models to be applied in real-time.

By way of example, two latent approaches that can be used with binary data include Weighted Regularized Matrix Factorization (WRMF) and Bayesian Personalized Ranking Matrix Factorization (BPR-MF). Both WRMF and BPR-MF are examples of factorization. WRMF is a regression method that learns user-item factors by minimizing the weighted reconstruction error:

${\sum\limits_{n = 1}^{N}\;{\sum\limits_{m = 1}^{M}{\text{?}\left( {{R\left( {u_{n},v_{m}} \right)} - {\text{?}\left( \text{?} \right)} - {{V_{r}\left( \text{?} \right)}\text{?}}} \right)\text{?}}}} + {\lambda\text{?}{U_{r}}\text{?}} + {\lambda_{v}{V_{r}}\text{?}}$ ?indicates text missing or illegible when filed

where U_(r) is an N×r user factor matrix, V_(r) is an M×r item factor matrix, and c_(nm) is a weight that is set separately for every user-item pair. For binary data c_(nm) is set to:

c _(nm)=1αR(u _(n) ,v _(m))

This formulation adds an extra a weight to every pair with R(u_(n),v_(m))=1 forcing optimization to concentrate on those pairs. WRMF can use alternating least squares to optimize this model with an overall complexity of 0(Nr²+(N+M)r³) where N is the total number of non-zero entries in R.

BPR-MF is a ranking approach and optimizes pairwise objectives that attempt to place pairs with observed preference above the unobserved ones:

     ?log (1 + ?) → ??² + λ_(v)?² ?indicates text missing or illegible when filed

where triplets (u_(n),v_(m),v_(l)) are sampled with a condition that R(u_(n),v_(m))=1 and R(u_(n),v_(l))=0. Similarly to WRMF, this implies an assumption that every item v_(l) with R(u_(n),v_(l))=0 is not relevant and should be ranked below the relevant items v_(m) with R(u_(n),v_(m))=1. Moreover, each relevant (irrelevant) item is assumed to be equally relevant (irrelevant). These assumptions often may not hold in real-life scenarios where noisy implicit signals tend to produce incorrect/outlier preferences that should be discounted.

It may not be optimal to treat every observed (unobserved) items as equally relevant (irrelevant) in the binary CF setting. Consider an example in which a person purchases the following movies: “The Lord of the Rings” trilogy, both “Hobbit” releases, and “The Devil Wears Prada” (the latter being a present for a friend). If we could request explicit preference data from this user we would immediately know that he or she does not enjoy movies like “The Devil Wears Prada” since this movie was purchased for a friend and not the user. However, given that we only have access to purchase history, objectives in WRMF and BPR-MF would treat all purchases as equally relevant. During optimization for this user, both methods would aim to derive latent representations that equally rank each of the movies at the top. Such a ranking would not be optimal since one of the movies (i.e., “The Devil Wears Prada”) was not a preference for the user, but bought as a gift. This situation creates a problem since the data does not reveal that one of the movies was bought for a gift.

One way of dealing with this problem is through model regularization, and both methods apply strict regularization to penalize user and item factors. However, as the number of outliers increases the problem becomes more severe and might no longer be fixable by heavy regularization.

Neighborhood-based CF approaches address this problem by estimating item scores for a target user using a similarity from neighboring users and/or items. Formally, given an item v and target user u, the user-user approach estimates the score for v by comparing u with other users that expressed preference for v:

$\begin{matrix} {{{user}\text{-}{user}\text{∷}\mspace{20mu}{S\left( {u,v} \right)}} = {\sum\limits_{u^{\prime} \in {U{(v)}}}^{\;}\;{{R\left( {u,:} \right)}{R\left( {u^{\prime},:} \right)}^{T}}}} & {{EQ}.\mspace{14mu} 1} \end{matrix}$

The idea behind this approach is based on the assumption that if users similar to u prefer v then S(u,v) should be high and v should be recommended to u. In the item-item approach, vis compared to all items that u has expressed preference for:

$\begin{matrix} {{{item}\text{-}{item}\text{∷}\mspace{20mu}{S\left( {u,v} \right)}} = {\sum\limits_{v^{\prime} \in {V{(n)}}}^{\;}\;{{R\left( {:{,v}} \right)}^{T}{R\left( {:{,v^{\prime}}} \right)}^{\;}}}} & {{EQ}.\mspace{14mu} 2} \end{matrix}$

This method produces higher scores for items that are similar to items for which u has expressed a preference.

After estimating scores for every item either via the user-user or the item-item method, the resulting score vector S(u,:) is sorted and top-r items are presented to u. In practice it is often found that the accuracy of each method can be improved if a dot product is replaced with a more complex metric, such as a cosine similarity. For example, this replacement can be done for the binary domain, by applying L² normalizations:

$\mspace{79mu}{{{row}\text{-}{norm}\text{:~~~}{R\left( {u,:} \right)}} = \frac{R\left( {\text{?},\text{?}} \right)}{\sqrt{\sum_{n = 1}^{N}{R\left( {u,\text{?}} \right)}^{2}}}}$ $\mspace{79mu}{{{col}\text{-}{norm}\text{:~~~}{R\left( {:{,v}} \right)}} = \frac{R\left( {\text{?},\text{?}} \right)}{\sqrt{\sum_{m = 1}^{M}{R\left( {u_{m},\text{?}} \right)}^{2}}}}$ ?indicates text missing or illegible when filed

For many datasets, applying both normalizations before computing similarities produces gains of up to 30%. Further, the order in which these normalizations are applied can be validated separately for each dataset. When only row-norm (col-norm) normalization is applied, user-user (item-item) scores become the sums of cosine similarities.

For the aforementioned movie example, applying neighbor approach such as item-item would generate a lower score for the unwanted movie (i.e., “The Devil Wears Prada”) since this movie is not similar to any other purchase by this user. The neighbor approach thus provides an effective way to resolve ties in the binary preference matrix, and the neighbor score matrix S reflects user preferences more accurately than the raw binary matrix R.

One example embodiment utilizes a neighbor approach and factorizes the neighbor score matrix S instead of the original binary matrix R. Using S instead of R effectively resolves ties in the binary preference data, and applying low-rank factorization produces models that support efficient inference and reduces the noise that is often present when similarities are computed on highly sparse data.

According to block 220, the computer system applies a neighborhood-based approach to convert the binary matrix (R) into a neighbor-score matrix (S). By way of example, in a binary setting, the neighbor-score matrix is generated via the user-user (EQ. 1) or item-item (EQ. 2) methods.

According to block 230, the computer system applies a factorization to approximate the neighbor-score matrix (S) with a product of lower rank matrices. By way of example, Singular Value Decomposition (SVD) is used to approximate the neighbor-score matrix (S) with a product of three matrices by:

S≈U _(r)Σ_(r) V _(r) ^(T)

where r is an SVD rank, U_(r) is an N×r matrix, Σr is an r×r diagonal matrix, V_(r) is an M×r matrix, and V_(r) ^(T) is a transpose of matrix V_(r).

According to block 240, the computer system calculates a user factor and an item factor based on the factorization. By way of example, once the SVD factorization is completed Σr is absorbed into U_(r). As such, U_(r) denotes the product of two matrices (U_(r)Σ_(r)) from the SVD decomposition in the following paragraphs. The user factor is a vector represented by U_(r)(u,:), and the item factor is a vector represented by V_(r)(v,:).

According to block 250, the computer system calculates scores for user-item pairs by computing a dot product between the user factor and the item factor. The scores for every user-item pair are calculated by computing dot product between the corresponding user and item factors:

S(u,v)≈U _(r)(u,:)V _(r)(u,:)^(T)

According to block 260, the computer system sorts the scores of the user-item pairs to generate the recommendation to the user. By way of example, the scores of the user-item pairs are arranged from the highest to the lowest and the items with higher scores are recommended to the relevant user.

According to block 270, the computer system provides the recommendation to computer of the user. By way of example, the recommendation is transmitted to the user, displayed to the user, stored for the user, processed for the user, or used to make further recommendations to or on behalf of the user.

By way of example, one embodiment performs factorization with SVD. Example embodiments, however, are not limited to using SVD as most other factorization methods can be used as well. By replacing the original binary matrix R with S example embodiments can apply various latent approaches. Some examples of the objective functions that can be used to learn U and V are provided below.

Consider an example of a regression objective, such as the squared error and weighted squared error (used in WRMF):

$\mspace{79mu}{{sq}.\mspace{14mu}{{error}:{\underset{n = 1}{\overset{N}{\mspace{14mu}\sum}}{\sum\limits_{m = 1}^{M}\left( {{S\left( {\text{?},\text{?}} \right)} - {{U_{r}\left( {\text{?},\text{?}} \right)}\text{?}\left( {\text{?},\text{?}} \right)^{T}}} \right)^{2}}}}}$ $\mspace{76mu}\begin{matrix} {\;{{wrmf}\text{:}\underset{n = 1}{\overset{N}{\mspace{14mu}\sum}}{\sum\limits_{m = 1}^{M}{\text{?}\left( {{R\left( {\text{?},\text{?}} \right)} - {{U_{r}\left( {\text{?},\text{?}} \right)}\text{?}\left( {\text{?},\text{?}} \right)^{T}}} \right)^{2}}}}} \\ {\text{?} = {1 + {\alpha\;{S\left( {\text{?},\text{?}} \right)}}}} \end{matrix}$ ?indicates text missing or illegible when filed

Unlike another CF where effort is concentrated on rating prediction, for binary preference CF an example goal is to optimize the ranking accuracy. Ranking-based objectives might thus be suited for this problem. Since S provides rich ordering information over the items, an example embodiment applies objectives from learning-to-rank to this domain. Examples of two such objectives include RankNet (also used in BPR-MF) and ListNet:

$\mspace{79mu}{{ranknet}\text{:}\begin{matrix} {\text{?}{\log\left( {1 + \text{?}} \right)}} \\ {{{for}\mspace{14mu}{S\left( {\text{?},\text{?}} \right)}} > {S\left( {u_{n},\text{?}} \right)}} \end{matrix}}$ ${{listnet}\text{:}} - {\sum\limits_{n = 1}^{N}{\sum\limits_{m = 1}^{M}{\frac{\phi\;\left( {S\left( \text{?} \right.} \right.}{\text{?}{\phi\left( {S\left( {\text{?},\text{?}} \right)} \right.}}{\log\left( \frac{\phi\left( {{U_{r}\left( {\text{?},\text{?}} \right)}{V_{r}\left( {\text{?},\text{?}} \right)}^{T}} \right)}{{\text{?}{\phi\left( {{U_{r}\left( {\text{?},\text{?}} \right)}{V_{r}\left( {\text{?},\text{?}} \right)}^{T}} \right)}}\;} \right)}}}}$ ?indicates text missing or illegible when filed

SVD provides an effective way to derive latent representations. This method, however, may require computing and storing the full score matrix S which may not practical or desirable for large-scale applications. Example embodiments include methods and apparatus to reduce this computation and/or storage, such as using a block update and sparse similarity discussed herein.

The naive SVD model has runtime complexity of O(NM log(r)+(N+M)r²) using the stochastic SVD algorithm and requires O(NM) space. Consider an example of block update which utilizes incremental SVD where factorization is built in stages to enable processing of large amounts of data without explicitly storing the data. For instance, a method takes as input “current” factorization UΣV^(T)≈X and matrix A, and produces updated SVD factorization U_(new)Σ_(new)V_(new) ^(T)≈

Note that in this formulation V^(T) gets expanded to have a same or similar number of columns as [X,A] whereas U and Σ get updated but do not change in size. Analogous algorithm can be used to update U: using the fact that VΣU^(T)=X^(T) generates the following:

V _(new)Σ_(new) U _(new) ^(T)≈[X ^(T) ,A ^(T)].

Consider an example that incrementally factorizes users to achieve considerable savings in space requirements. Users are partitioned into blocks of size N_(b) and for each block iteratively (1) calculate N_(b)×M neighbor score matrix and (2) update SVD factorization to include latent factors for users in the block. The runtime complexity of this block-factorization method is:

O(NM log(r)+(N+M)r ²) for r<√{square root over (min(N,M))}.

The space for this method reduces to 0(N_(b)M+(N+M)r)) where O(N_(b)M) is the block size, and 0((N+M)r) is the space required to store the final U_(r) and V_(r) factors. This represents a large reduction in space from the original O(NM) and makes the method practical for CF applications. Moreover, block update provides an effective way to update the SVD model when new users and/or items are added to the system. Further, users can be incrementally processed but the same algorithm can be straightforwardly modified to incrementally process items instead. Thus depending on whether N>>M or N<<M example embodiments include user oriented approach and/or item oriented approach.

As noted, incremental block updates can significantly reduce the space complexity to O(N_(b)M) where N_(b) is the block size. For large scale applications, however, the number of items can reach millions or hundreds of millions so even O(N_(b)M) can become too large. To deal with this problem, one example embodiment uses sparse similarity and selectively uses a small subset of similarity scores for each user. This is achieved by storing the largest p scores for each user and zeroing out the rest of the scores.

Sparse similarity uses the largest scores to maximize the accuracy at the top of the ranking. Items with large scores are thus particularly relevant since they would appear at the top for each user. Furthermore, SVD produces factorizations that are closest to the target matrix in Frobenius norm (i.e., root mean squared error). By zeroing out low scores, SVD concentrates on ordering items at the top correctly and puts less emphasis on relative orderings at the bottom.

This sparse similarity approach allows an example embodiment to further reduce the space requirement for each block to O(N_(b)p) since sparse format can now be used and zeros do not need to be explicitly stored. Sparse representation also allows for efficient matrix multiplication and the complete block-factorization can now be computed in 0(T_(mult)r+(N+M)r²) where T_(mult) is the cost of matrix-vector multiplication with sparse score matrix. Given that the entire score matrix now has at most Np non-zero entries, the matrix-vector product can be computed in time proportional to Np, and for p<<M we get that T_(mult)<<NM. Note that 0(T_(mult)r+(N+M)r²) is an order of magnitude more efficient than WRMF with complexity O(r²N+(N+M)r³).

FIG. 3 shows an example algorithm 300 with block update and sparse similarity.

One goal of CF is to efficiently provide accurate recommendations to new users that were not available during model optimization. This problem is referred to as strong generalization and is addressed in a recommender system of an example embodiment.

Neighbor-based models can generally be applied to new users without difficulties since similarities can be straightforwardly re-calculated to incorporate new data. Latent approaches on the other hand, often use complicated non-convex objectives and thus require expensive gradient updates to be conducted for every new user. An example embodiment addresses the strong generalization problem in the SVD model and derives an update equation to efficiently produce latent factors for new users.

One way of dealing with new users/items is to run a full block SVD update to generate new latent factors and also update the rest of the model. This update can be run after

S(n,:)≈U _(r)(u,:)V _(r) ^(T)

one or more new users/items have been added. For example, consider a method to approximate latent factors by utilizing the properties of SVD factorization. First, note that the score vector for every user u is approximated by the user item factor product:

where Σ_(r) is absorbed into U_(r). From this it follows that:

U _(r)(u,:)≈S(u,:)V _(r) ^(T(-1))

U _(r)(u,:)≈S(u,:)V _(r)

but since V_(r) is approximately orthogonal we get that V_(r) ⁻¹≈V_(r) ^(T) and:

A similar approach can be used to derive an equation for item factors: V_(r)(v,:)≈S(:,v)^(T)U_(r). The equation above provides a convenient and effective way to approximate and update user factors for a new user u by (1) calculating top-p neighbor scores S(u,:) and (2) multiplying S(u,:) with V_(r) to get U_(r)(u,:).

In production-level systems, the equation above can be used to quickly generate recommendations for each new user. A full block updates is executed once enough new users/items have been added. Note that unlike gradient-based models, block update does not require any iterative optimization or parameter tuning (initialization, learning rate, weight penalty etc.) and can efficiently update the entire model.

As such, an example embodiment utilizes an SVD-based model that has low complexity and storage requirement block update that can efficiently update the entire model. Further, in an example embodiment, two parameters are tuned: rank r and sparsity factor ρ (block size N_(b) is typically selected to maximize RAM usage). The SVD-based model can scale to large CF problems with distributed implementations (e.g., Mahout's stochastic SVD). Furthermore, new users/items can be quickly incorporated into existing models with one matrix multiplication.

Consider an example embodiment that is applied to a large publicly available dataset from Kaggle's Million Song Dataset (MSD) challenge. The MSD dataset consists of listening histories for 1.2 million (M) users and 380 thousand (K) songs. The goal of the challenge was to use these listening histories to recommend 500 songs for a subset of 110K test users. The data for the 110K test users was partitioned into training and test sets, and only training portion was made available to the challenge participants (in addition to full listening history for the other 1.1M users). The test set was further split into two subsets with 10K and 100K users respectively. The results on the smaller 10K subset were made visible throughout the challenge (“public leaderboard”), while results on the 100K subset were only revealed at the end of the challenge (“private leaderboard”). All submissions had to provide rankings of top-500 songs for each of the 110K test users and were evaluated using MAP@500. At the end of the challenge organizers released all the challenge data (including test data) into public domain.

Note that the MSD dataset has more than 20 times more items than the Netflix dataset, and is over 100 times more sparse. This makes the problem challenging since many users/items have little data to build accurate representations.

The sparsity problem is further illustrated in FIG. 4 that shows fraction overlap as denoted at 400 between the training data for the 110K target users and most popular songs sorted in the order of popularity. The x-axis is a number of popular songs, and the y-axis is the fraction overlap. This figure shows that more that 93% of all the training data is contained within the first 100K most popular songs, leaving less than 7% of data for the remaining 280K songs.

The latent approaches were found to perform poorly in this challenge. The best latent submission was reported to get MAP@500 of 0.1095, while the winning solution achieved 0.1791 using a blend of user-user and item-item approaches. These results indicate that neighbor methods produce over 60% relative improvement in accuracy on this data compared to latent approaches. By contrast, and as discussed further below, an example embodiment eliminates this performance gap achieving results that are comparable to neighbor methods.

In the MSD experiments, an example embodiment followed the same set-up that was used during the competition and tune models on the 10K public leaderboard set, then evaluate on the 100K private leaderboard set. The algorithm 300 in FIG. 3 was implemented in Matlab and used a stochastic SVD library and a block SVD library. For block SVD, the example embodiment modified the provided code by replacing the call to Matlab's SVD's routine with a faster stochastic SVD call. MyMediaLite library was used to run the WRMF and BPR-MF baselines.

MAP@private leader board results are shown in table 500 of FIG. 5. For this dataset, a larger rank generally improved performance, and results are shown for four different rank sizes: 1 K, 5K, 10K and 20K. To reduce experiment complexity, the item space is down-sampled to include most popular songs and experimented with top 50,000 and 100,000 songs. The data shows that 100,000 (50,000) most popular songs contain over 93% (80%) of all training data. Consequently, selecting only the popular songs allows an example embodiment to reduce the item space by a factor of four while keeping most of the training data.

The results show that the SVD model with large enough rank is able to match the performance of the corresponding item-item approach. The results for the best SVD model place it in top-3 (out of 150 teams) on Kaggle's leaderboard with a score of 0.1623. This is by far the highest score for latent approach in this competition. Many of the top ten teams used combinations of user-user and/or item-item approaches, and the best latent approach was reported to only get 0.1095. Further, the SVD-1 K performs comparably to SVD-full on both 50,000 and 100,000 songs suggesting that scores for only 1,000 songs per user are required to produce accurate factorizations.

MSD is one the largest publically available datasets, and an example embodiment used it to benchmark the runtimes for the SVD approach and the best existing latent approach WRMF. To ensure accurate comparison each experiment was conducted on the same server with 32 Intel Xeon E5-2690 2.90 GHz cores and 64 GB of RAM. Runtimes in hours for the SVD model are shown in table 600 of FIG. 6.

Table 600 shows that full factorization with 100,000 songs can be completed in under 3 hours with rank 5,000 and under 6 hours with rank 10,000. For comparison, WRMF took over 10 hours to complete with rank 250, and using complexity bounds for rank 10,000 it would take over a month. These results demonstrate that an example embodiment is considerably more efficient than the existing state-of-the-art and scales well to large datasets.

FIGS. 4-6 show data supporting one or more example embodiments that determine user preferences from binary data. In one example embodiment, binary data in a matrix is transformed into a score matrix by applying neighborhood similarity rescaling. The score matrix is then factorized to produce accurate user and item representations. A factorization technique (such as SVD) generates an accurate representations using a small subset of the highest scores for each user.

FIG. 1 shows an example computer system in which the computer and/or one or more electronic devices in the computer system execute one or more example embodiments (such as one or more blocks discussed in FIG. 2). One or more processors or processing units (such as a central processing unit, CPU, microprocessor, application-specific integrated circuit (ASIC), etc.) communicates with memory and/or other hardware to execute tasks that implement one or more example embodiments discussed herein. By way of example, the memory stores applications, data, programs, algorithms (including software to implement or assist in implementing example embodiments) and other data. As another example, hardware in a computer or electronics are specifically adapted or specialized to execute or assist in executing one or more example embodiments (such as providing an ASIC designed to execute example embodiments).

In one example embodiment, the methods executed by the computer system reduce storage requirement in the respective storage devices of the computer system and speeds up runtime.

In some example embodiments, the methods illustrated herein and data and instructions associated therewith are stored in respective storage devices, which are implemented as computer-readable and/or machine-readable storage media, physical or tangible media, and/or non-transitory storage media. These storage media include different forms of memory including semiconductor memory devices such as DRAM, or

SRAM, Erasable and Programmable Read-Only Memories (EPROMs), Electrically Erasable and Programmable Read-Only Memories (EEPROMs) and flash memories; magnetic disks such as fixed, floppy and removable disks; other magnetic media including tape; optical media such as Compact Disks (CDs) or Digital Versatile Disks (DVDs). Note that the instructions of the software discussed above can be provided on computer-readable or machine-readable storage medium, or alternatively, can be provided on multiple computer-readable or machine-readable storage media distributed in a large system having possibly plural nodes. Such computer-readable or machine-readable medium or media is (are) considered to be part of an article (or article of manufacture). An article or article of manufacture can refer to a manufactured single component or multiple components.

Method blocks discussed herein can be automated and executed by a computer, computer system, user agent, and/or electronic device. The term “automated” means controlled operation of an apparatus, system, and/or process using computers and/or mechanical/electrical devices without the necessity of human intervention, observation, effort, and/or decision.

As used herein, “binary data” is data whose unit can take on only two possible states.

As used herein, “binary domain” is a domain where all data instantiations are binary.

As used herein, a “binary matrix” is a matrix in which each entry is either 0 or 1.

As used herein, “collaborative filtering” is a method or system that predicts preferences of a user for an item based on preferences of other users for the item.

As used herein, “explicit feedback” is preference feedback provided explicitly by the user.

As used herein, “implicit feedback” is preference feedback inferred implicitly from user actions.

As used herein, a “latent factor for a user” and a “user factor” are interchangeable.

As used herein, a “latent factor for an item” and an “item factor” are interchangeable.

As used herein, a “latent model” is a model where users and items are represented by latent factors.

As used herein, a “recommender” or “recommender system” is a system that predicts a preference that a user would give an item.

As used herein, a “score matrix” is a matrix of scores for some or all user-item pairs where each score represents a degree of preference for the corresponding user-item pair.

The apparatus and methods in accordance with example embodiments are provided as examples, and examples from one apparatus or method should not be construed to limit examples from another apparatus or method. Further, methods discussed within different figures can be added to or exchanged with methods in other figures. Further yet, specific numerical data values (such as specific quantities, numbers, categories, etc.) or other specific information should be interpreted as illustrative for discussing example embodiments. Such specific information is not provided to limit example embodiments. 

What is claimed is:
 1. A method for providing a recommendation to a user, the method comprising: obtaining, by a computer system, a preference matrix (R) representing a plurality of preferences between a set of users and a set of items, wherein an entry in the preference matrix (R) for a user and an item indicates whether the user expressed preference for the item; obtaining, by the computer system, a neighbor-score matrix (S) from the preference matrix (R) by computing neighbor scores for the set of users and the set of items, wherein a neighbor score for a particular user and a particular item in the neighbor-score matrix (S) represents user-user similarity between preferences of the particular user and preferences of other users who have expressed preferences for the particular item in the preference matrix (R), or item-item similarity between preferences for the particular item and preferences for other items that the particular user has expressed preferences for in the preference matrix (R); determining a set of user factors and a set of item factors by applying a decomposition method to the neighbor-score matrix (S), a user factor representing a user in a latent space and an item factor representing an item in the latent space; generating recommendations for one or more users and items from the set of user factors and the set of item factors; approximating, by the computer system, an item factor for a new item v by: V _(r)(v,:)≈S(:,v)^(T) U _(r) where S(:, v) is a neighbor-score vector for the new item v indicating neighbor scores for the set of users and the new item v, U_(r) are the set of user factors for the set of users, and V_(r)(v, :) is the item factor for the new item v; and generating recommendations for the new item v from the item factor for the new item v and the set of user factors.
 2. The method of claim 1, wherein determining the set of user factors and the set of item factors comprises applying singular value decomposition (SVD) as the decomposition method to the neighbor-score matrix (S).
 3. The method of claim 1, wherein generating the recommendations for the one or more users and items comprises performing a dot product between a user factor for a respective user and an item factor for a respective item in the one or more users and items.
 4. The method of claim 1, wherein obtaining the neighbor-score matrix (S) and determining the set of user factors and the set of item factors comprises: partitioning, by the computer system, the set of users into blocks of size N_(b) smaller than a number of the set of users; for each block, iteratively calculating an N_(b)×M neighbor score matrix, where M indicates a number of the items in the block; and for each block, performing the decomposition method to include user factors for the users in the block.
 5. The method of claim 4, further comprising, for each block: storing only a subset of p neighbor scores for a user in the block that are above a predetermined value or proportion.
 6. The method of claim 1, further comprising: approximating, by the computer system, the user factor for a new user u by: U _(r)(u,:)≈S(u,:)V _(r) where S(u,:) is a neighbor-score vector for the new user u indicating neighbor scores for the new user u and the set of items, V_(r) are the set of item factors for the set of items, and U_(r)(u, :) is the user factor for the new user u; and generating recommendations for the new user u from the user factor for the new user u and the set of item factors.
 7. The method of claim 1, further comprising: responsive to determining that a number of new items is above a predetermined threshold, updating the neighbor-score matrix (S) with neighbor scores for the new items; and updating the set of user factors and the set of item factors by applying the decomposition method to the updated neighbor-score matrix (S).
 8. The method of claim 1, wherein the entry in the preference matrix (R) for the user and the item is a non-zero value if the user interacted with the item, and zero otherwise.
 9. A method for providing a recommendation to a user, the method comprising: obtaining, by a computer system, a preference matrix (R) representing a plurality of preferences between a set of users and a set of items, wherein an entry in the preference matrix (R) for a user and an item indicates whether the user expressed preference for the item; obtaining, by the computer system, a neighbor-score matrix (S) from the preference matrix (R) by computing neighbor scores for the set of users and the set of items, wherein a neighbor score for a particular user and a particular item in the neighbor-score matrix (S) represents user-user similarity between preferences of the particular user and preferences of other users who have expressed preferences for the particular item in the preference matrix (R), or item-item similarity between preferences for the particular item and preferences for other items that the particular user has expressed preferences for in the preference matrix (R); determining a set of user factors and a set of item factors by applying a decomposition method to the neighbor-score matrix (S), a user factor representing a user in a latent space and an item factor representing an item in the latent space; generating recommendations for one or more users and items from the set of user factors and the set of item factors; approximating, by the computer system, the user factor for a new user u by: U _(r)(u,:)≈S(u,:)V _(r) where S(u,:) is a neighbor-score vector for the new user u indicating neighbor scores for the new user u and the set of items, V_(r) are the set of item factors for the set of items, and U_(r)(u, :) is the user factor for the new user u; and generating recommendations for the new item v from the user factor for the new user u and the set of item factors.
 10. The method of claim 9, wherein determining the set of user factors and the set of item factors comprises applying singular value decomposition (SVD) as the decomposition method to the neighbor-score matrix (S).
 11. The method of claim 9, wherein generating the recommendations for the one or more users and items comprises performing a dot product between a user factor for a respective user and an item factor for a respective item in the one or more users and items.
 12. The method of claim 9, wherein obtaining the neighbor-score matrix (S) and determining the set of user factors and the set of item factors comprises: partitioning, by the computer system, the set of users into blocks of size N_(b) smaller than a number of the set of users; for each block, iteratively calculating an N_(b)×M neighbor score matrix, where M indicates a number of the items in the block; and for each block, performing the decomposition method to include user factors for the users in the block.
 13. The method of claim 12, further comprising, for each block: storing only a subset of p neighbor scores for a user in the block that are above a predetermined value or proportion.
 14. The method of claim 9, further comprising: approximating, by the computer system, the item factor for a new item v by: V _(r)(v,:)≈S(:,v)^(T) U _(r) where S(:, v) is a neighbor-score vector for the new item v indicating neighbor scores for the set of users and the new item v, U_(r) are the set of user factors for the set of users, and V_(r)(v, :) is the item factor for the new item v; and generating recommendations for the new item v from the item factor for the new item v and the set of user factors.
 15. The method of claim 9, further comprising: responsive to determining that a number of new users is above a predetermined threshold, updating the neighbor-score matrix (S) with neighbor scores for the new users; and updating the set of user factors and the set of item factors by applying the decomposition method to the updated neighbor-score matrix (S).
 16. The method of claim 9, wherein the entry in the preference matrix (R) for the user and the item is a non-zero value if the user interacted with the item, and zero otherwise. 